import serviceTime from '../../../api/config/service-time'
export const getServiceTimeList = ({commit}, data) => {
  return serviceTime.getServiceTimeList(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
export const createServiceTime = ({commit}, data) => {
  return serviceTime.createServiceTime(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
export const updateServiceTime = ({commit}, data) => {
  return serviceTime.updateServiceTime(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
export const getShiftsAndHolidaysInfo = ({commit}, data) => {
  return serviceTime.getShiftsAndHolidaysInfo(data)
    .then(response => {
      return response
    })
    .catch(() => {
      commit(globalTypes.SET_ERROR, 'message.default_tips')
    })
}
